public class Demofs8 {
    int getLeafNodeCount2(BinaryTree.TreeNode root) {
        if(root.left == null && root.right == null){
            return 1;
        }
        return getLeafNodeCount2(root.left) + getLeafNodeCount2(root.right);
    }
}
